#ifndef __DES_H__
#define __DES_H__

// Discrete Event Simulator
#include <cstdlib>
#include "actor.h"
#include "network.h"
#include "newtypes.h"
class Actor;
class Network;

class DES
{
    // Data
    public:

    public:
        DES(Param p);
        ~DES();
        void init(Param p);

        // execute the simulation
        void execute(const char *filename = "socialNetwork", int dump = -1);

        void test(); // example test function

    private:
        Actor *actors;
        Network *socialNetwork;
        Param simParam;

        boost::uniform_real<> udist;
        boost::variate_generator<base_generator_type&, boost::uniform_real<> > urandom;

        // Internal Functions
        void randomSchedule (int schedule[], int N);
        void swap(int &p, int &q);
        int randint(int l, int u);


        void writeMetrics(const char* fileName);

        DES operator = (const DES &);
        DES(const DES& );
};

#endif
